import uvicorn
from fastapi import FastAPI
from app.routers import RegisterRouterList

# 实例化
app = FastAPI()
# 加载路由 
for item in RegisterRouterList:
    app.include_router(item)


@app.on_event("shutdown")
async def shutdown_event():
    # 清理操作
    print("清理任务执行")


if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=16601)
